\(\int \frac {1}{x \sqrt {\cos (a+b \log (c x^n))}} \, dx\) [117]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [C] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 24 \[ \int \frac {1}{x \sqrt {\cos \left (a+b \log \left (c x^n\right )\right )}} \, dx=\frac {2 \operatorname {EllipticF}\left (\frac {1}{2} \left (a+b \log \left (c x^n\right )\right ),2\right )}{b n} \]

[Out]

2*(cos(1/2*a+1/2*b*ln(c*x^n))^2)^(1/2)/cos(1/2*a+1/2*b*ln(c*x^n))*EllipticF(sin(1/2*a+1/2*b*ln(c*x^n)),2^(1/2)
)/b/n

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {2720} \[ \int \frac {1}{x \sqrt {\cos \left (a+b \log \left (c x^n\right )\right )}} \, dx=\frac {2 \operatorname {EllipticF}\left (\frac {1}{2} \left (a+b \log \left (c x^n\right )\right ),2\right )}{b n} \]

[In]

Int[1/(x*Sqrt[Cos[a + b*Log[c*x^n]]]),x]

[Out]

(2*EllipticF[(a + b*Log[c*x^n])/2, 2])/(b*n)

Rule 2720

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ
[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{\sqrt {\cos (a+b x)}} \, dx,x,\log \left (c x^n\right )\right )}{n} \\ & = \frac {2 \operatorname {EllipticF}\left (\frac {1}{2} \left (a+b \log \left (c x^n\right )\right ),2\right )}{b n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {1}{x \sqrt {\cos \left (a+b \log \left (c x^n\right )\right )}} \, dx=\frac {2 \operatorname {EllipticF}\left (\frac {1}{2} \left (a+b \log \left (c x^n\right )\right ),2\right )}{b n} \]

[In]

Integrate[1/(x*Sqrt[Cos[a + b*Log[c*x^n]]]),x]

[Out]

(2*EllipticF[(a + b*Log[c*x^n])/2, 2])/(b*n)

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 1.18 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.08

method result size
derivativedivides \(\frac {2 \,\operatorname {InverseJacobiAM}\left (\frac {a}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}, \sqrt {2}\right )}{n b}\) \(26\)
default \(\frac {2 \,\operatorname {InverseJacobiAM}\left (\frac {a}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}, \sqrt {2}\right )}{n b}\) \(26\)

[In]

int(1/x/cos(a+b*ln(c*x^n))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/n/b*InverseJacobiAM(1/2*a+1/2*b*ln(c*x^n),2^(1/2))

Fricas [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.08 (sec) , antiderivative size = 78, normalized size of antiderivative = 3.25 \[ \int \frac {1}{x \sqrt {\cos \left (a+b \log \left (c x^n\right )\right )}} \, dx=\frac {-i \, \sqrt {2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) + i \, \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )\right ) + i \, \sqrt {2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) - i \, \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )\right )}{b n} \]

[In]

integrate(1/x/cos(a+b*log(c*x^n))^(1/2),x, algorithm="fricas")

[Out]

(-I*sqrt(2)*weierstrassPInverse(-4, 0, cos(b*n*log(x) + b*log(c) + a) + I*sin(b*n*log(x) + b*log(c) + a)) + I*
sqrt(2)*weierstrassPInverse(-4, 0, cos(b*n*log(x) + b*log(c) + a) - I*sin(b*n*log(x) + b*log(c) + a)))/(b*n)

Sympy [F]

\[ \int \frac {1}{x \sqrt {\cos \left (a+b \log \left (c x^n\right )\right )}} \, dx=\int \frac {1}{x \sqrt {\cos {\left (a + b \log {\left (c x^{n} \right )} \right )}}}\, dx \]

[In]

integrate(1/x/cos(a+b*ln(c*x**n))**(1/2),x)

[Out]

Integral(1/(x*sqrt(cos(a + b*log(c*x**n)))), x)

Maxima [F]

\[ \int \frac {1}{x \sqrt {\cos \left (a+b \log \left (c x^n\right )\right )}} \, dx=\int { \frac {1}{x \sqrt {\cos \left (b \log \left (c x^{n}\right ) + a\right )}} \,d x } \]

[In]

integrate(1/x/cos(a+b*log(c*x^n))^(1/2),x, algorithm="maxima")

[Out]

integrate(1/(x*sqrt(cos(b*log(c*x^n) + a))), x)

Giac [F]

\[ \int \frac {1}{x \sqrt {\cos \left (a+b \log \left (c x^n\right )\right )}} \, dx=\int { \frac {1}{x \sqrt {\cos \left (b \log \left (c x^{n}\right ) + a\right )}} \,d x } \]

[In]

integrate(1/x/cos(a+b*log(c*x^n))^(1/2),x, algorithm="giac")

[Out]

integrate(1/(x*sqrt(cos(b*log(c*x^n) + a))), x)

Mupad [B] (verification not implemented)

Time = 26.37 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.96 \[ \int \frac {1}{x \sqrt {\cos \left (a+b \log \left (c x^n\right )\right )}} \, dx=\frac {2\,\mathrm {F}\left (\frac {a}{2}+\frac {b\,\ln \left (c\,x^n\right )}{2}\middle |2\right )}{b\,n} \]

[In]

int(1/(x*cos(a + b*log(c*x^n))^(1/2)),x)

[Out]

(2*ellipticF(a/2 + (b*log(c*x^n))/2, 2))/(b*n)